A r t i c l e s
Navigation

Note: This site is
a bit older, personal views
may have changed.

M a i n P a g e

D i r e c t o r y

MOD And DIV operators


{ find out whether complete division or partial occurred }
function DivCheck(divby: integer; into: integer; var leftover: integer): integer;
begin
  result:= into div divby;
  leftover:= into mod divby ;
end;

var
  LeftOver: integer;
begin
  writeln('Divides completely: ', divcheck(6, 10, LeftOver), ' times.');
  writeln('Leftover: ', LeftOver);
  readln;
end.



About
This site is about programming and other things.
_ _ _